package cn.zhuangcloud.newversion.githook;

import cn.zhuangcloud.newversion.common.controller.BaseController;
import cn.zhuangcloud.newversion.common.validator.TokenValidator;
import com.jfinal.aop.Before;
import com.jfinal.aop.Clear;
import com.jfinal.ext.interceptor.POST;

@Clear(TokenValidator.class)
public class HookController extends BaseController {

    private static final HookService srv = HookService.me;

    @Before(POST.class)
    public void index() {
        String request = getPara("hook");
        renderJson(srv.handle(request));
    }

}
